<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/dhj/records/Attendance_Records.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/dhj/records/Attendance_Records.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'AttendanceId',
                footer: "Foots",
                cnName: '每日考核',
                name: 'records/Attendance_Records',
                url: "/Attendance_Records/",
                sortName: "AttendanceId"
            });
            const editFormFields = ref({"Division":"","Manager":"","TravelStatus":"","Classify":""});
            const editFormOptions = ref([[{"title":"事业部","field":"Division"},
                               {"title":"业务经理","field":"Manager"},
                               {"title":"是否出差","field":"TravelStatus"},
                               {"dataKey":"1","data":[],"title":"分类","field":"Classify","type":"select"}]]);
            const searchFormFields = ref({"Division":"","Manager":"","TravelStatus":"","Attendance_date":""});
            const searchFormOptions = ref([[{"title":"业务经理","field":"Manager","type":"like"},{"title":"事业部","field":"Division"}],[{"title":"出勤日期","field":"Attendance_date","type":"date"},{"title":"是否出差","field":"TravelStatus"}]]);
            const columns = ref([{field:'AttendanceId',title:'AttendanceId',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Division',title:'事业部',type:'string',width:110,align:'left',sort:true},
                       {field:'Manager',title:'业务经理',type:'string',width:110,align:'left'},
                       {field:'TravelStatus',title:'是否出差',type:'string',width:220,align:'left'},
                       {field:'Attendance_date',title:'出勤日期',type:'date',width:150,align:'left',sort:true},
                       {field:'BusinessHour',title:'上班时间',type:'string',width:150,align:'left'},
                       {field:'ClosingHour',title:'下班时间',type:'string',width:150,align:'left'},
                       {field:'AttendanceTime',title:'出勤时间',type:'string',width:150,align:'left'},
                       {field:'AttendanceLocation',title:'出勤地点',type:'string',width:220,align:'left'},
                       {field:'CheckInLocation',title:'签到地点',type:'string',width:110,align:'left'},
                       {field:'Classify',title:'分类',type:'int',bind:{ key:'1',data:[]},width:110,align:'left'},
                       {field:'Year',title:'年',type:'string',width:110,hidden:true,align:'left'},
                       {field:'Month',title:'月',type:'string',width:110,hidden:true,align:'left'},
                       {field:'Day',title:'日',type:'string',width:110,hidden:true,align:'left'},
                       {field:'Province',title:'省',type:'string',width:110,hidden:true,align:'left'},
                       {field:'City',title:'市',type:'string',width:110,hidden:true,align:'left'},
                       {field:'District',title:'区',type:'string',width:220,hidden:true,align:'left'},
                       {field:'StaffAccount',title:'员工账号',type:'string',width:80,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
